package com.hang.gymmanager.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hang.gymmanager.entity.CommodityEntity;
import com.hang.gymmanager.req.*;
import com.hang.gymmanager.res.CommodityRes;
import com.hang.gymmanager.res.UserCommodityPageRes;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


public interface CommodityService extends IService<CommodityEntity> {
    Page<CommodityRes> getAllCommodity(PageCommodityReq req);

    Integer addCommodity(AddCommodityReq req);

    void deleteCommodity(DeleteCommodityReq req);

    void updateCommodity(UpdateCommodityReq req);

    CommodityEntity commodityDetail(Integer id);

    Page<UserCommodityPageRes> userCommodityPage(userCommodityPageReq req);

    void buy(List<BuyCommodityReq> req);

    void uploadPic(MultipartFile file, Integer commodityId);
}
